package com.rxh.service.impl.core;

import com.rxh.mapper.core.CoreOrderMapper;
import com.rxh.pojo.Result;
import com.rxh.pojo.core.CoreOrder;
import com.rxh.service.base.AbstractBaseService;
import com.rxh.service.core.CoreOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * User: 陈俊雄
 * Date: 2018/10/16
 * Time: 14:28
 * Project: Management
 * Package: com.rxh.service.impl.core
 */
@Service
public class CoreOrderServiceImpl extends AbstractBaseService<CoreOrder, Long> implements CoreOrderService {

    private final CoreOrderMapper orderMapper;

    @Autowired
    public CoreOrderServiceImpl(CoreOrderMapper orderMapper) {
        this.orderMapper = orderMapper;
        setMapper(orderMapper);
    }


    @Override
    public Result<CoreOrder> selectByMerchantIdAndMerchantOrderId(Integer merchantId, String merchantOrderId) {
        return new Result<>(Result.SUCCESS, orderMapper.selectByMerchantIdAndMerchantOrderId(merchantId, merchantOrderId));
    }
}
